import { http } from '@/utils/http/axios';
import axios from 'axios';

/**
 * @description: 获取用户table展示数据
 */
export function getTableList(params) {
  console.log('getTableListparams', params);
  return http.request({
    url: '/project/project_data',
    method: 'get',
    params: params,
  });
}

/**
 * @description: 批量删除选中的数据
 */
export function batchDelProject(params) {
  console.log('batchdel param:', params);
  return http.request({
    url: '/project/del_project',
    method: 'POST',
    data: params,
  });
}

/**
 * @description: 创建新用户
 */
export function createProject(params) {
  return http.request({
    url: '/project/add_project',
    method: 'POST',
    params,
  });
}

/**
 * @description: 更新用户
 */
export function updateProject(params) {
  return http.request({
    url: '/project/update_project',
    method: 'POST',
    params,
  });
}

/**
 * @description: edit初始化
 */
export function getEditInit(params) {
  return http.request({
    url: '/project/edit_project_init',
    method: 'GET',
    params: params,
  });
}
